package chapter1;

public class Point {
	public static Point origin = new Point();
	
	public double x, y;
	
	public void clear(){
		System.out.println("clear in Point");
		x = 0.0;
		y = 0.0;
	}
	
	public double distance(Point that){
		double xdiff = x - that.x;
		double ydiff = y - that.y;
		return Math.sqrt(xdiff * xdiff + ydiff * ydiff);
	}
}
